<template>
  <div class="container">
    <input v-model="message" />
    <Child></Child>
  </div>
</template>

<script>
// 引入组件
import ChildComponent from "./ChildComponent.vue";
export default {
  // 注册组件
  components: {
    Child: ChildComponent,
  },
  provide() {
    return {
      grandpaMsg: () => this.message,
    };
  },
  data() {
    return {
      message: "test",
    };
  },
  methods: {},
};
</script>
